[ENG-3771] projects-cli-0: explicit projects CLI#731
Open
mrmoxon wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prime projectcommand group plus Projects API/context helpersValidation
uv run pytest packages/prime/tests/test_rl_config.py packages/prime/tests/test_projects_cli.py packages/prime/tests/test_eval_push.py packages/prime/tests/test_hosted_eval.py packages/prime/tests/test_rl_api.py packages/prime/tests/test_deployments.py packages/prime-evals/tests/test_evals.py -quv run ruff check packages/prime/src/prime_cli/commands/rl.py packages/prime/src/prime_cli/api/projects.py packages/prime/src/prime_cli/commands/projects.py packages/prime/src/prime_cli/utils/projects.py packages/prime/src/prime_cli/commands/evals.py packages/prime/src/prime_cli/utils/eval_push.py packages/prime/src/prime_cli/verifiers_bridge.py packages/prime/tests/test_projects_cli.py packages/prime/tests/test_eval_push.py packages/prime/tests/test_hosted_eval.py packages/prime-evals/src/prime_evals/evals.py packages/prime-evals/tests/test_evals.pyStacked with #732, which contains the default-project UX layer.
Note
Medium Risk
Touches evaluation create/update payloads and training-run project PATCH flows across CLI and SDK; mis-scoped project context could attach artifacts to the wrong team/project, though scope validation and explicit-only defaults limit blast radius.
Overview
Adds Lab projects end-to-end: a new
prime projectcommand group (create/list/show/use/current/update/clear plusassign/removefor training runs, evaluations, and adapters), backed by a Projects API client and workspace active-project context (.prime/lab/context.json, optionalPRIME_PROJECT_ID, team-scope checks).Training and evals gain explicit
--project/--no-projectflags: hosted training launches sendproject_id;eval pushandeval run(local and hosted) attach or clear project membership without silently defaulting to the active workspace project in this tranche. SDK/API wiring extendsprime-evalswithproject_idon create,update_evaluation(..., clear_project=True), and switches owner-qualified environment resolution toPOST /environmentshub/lookup. RL runs and LoRA adapters get PATCH project-membership helpers on the CLI API clients.README and package docs document the new workflows; tests cover project CLI, eval push/hosted payloads, and API payload shapes.
Reviewed by Cursor Bugbot for commit 65d3769. Bugbot is set up for automated code reviews on this repo. Configure here.